#pragma once

#include <iostream>
#include <memory>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <cerrno>
#include <signal.h>
#include <stdlib.h>
#include <cstring>
#include <unistd.h>
#include <cassert>
#include <pthread.h>
#include <sys/wait.h>
#include <stdio.h>
#include <string>
#include <sys/epoll.h>
#include <fcntl.h>
#include <vector>

#define BUFFER_NUM 1024
#define MAX_EVENTS 1024

// if condition is false,exit!
void myAssert(bool condition, const char *errmsg);

// 设置非阻塞模式
void setnonblocking(int fd);